﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<title>量距离测面积</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<style>
	code{
    background: none repeat scroll 0 0 #F5F5F5;
    border: 1px dotted #778855;
    font-family: "Courier New",monospace;
    font-size: 12px;
    padding: 5px;
	width: 500px;}
	</style>
	<script type="text/javascript" src="proj/resources/javascript/jquery/jquery-1.5.2.min.js"></script>
	<script type="text/javascript" src="proj/resources/javascript/flashmap/flashmap_all.js"></script>
    <script type="text/javascript">
        $(function(){
			$("body").prepend($("<a>").attr("href","http://code.google.com/p/njcjtx/source/browse/trunk/samples/"+$("title").text()+".html").attr("target","blank").text("查看页面源码(Google Code)"));
			
            var onMapLoadHandler = function(){
				//设置当前显示区域
                map.extent([13199146.044280795, 3697106.1840964477, 13705159.17152842, 3843865.278403916]);
            };
            
            map = new iMap({
                dom:"flashContent",
                type:"street",
                width:"100%",
                height:300,
                onLoad:onMapLoadHandler
            });
			
			$("legend > input").attr("value","执行代码").click(function(){
				var script = $(this).parent("legend").next().text();
				eval(script);
			});
        });
    </script>
	</head>
	<body>
		<div id="flashContent" style="border:solid 1px"></div>
        <div id="demo" style="postion:absolute;">
            <p>量距离：</p>         
            <fieldset>
                <legend><input type="button"></input></legend>
                <code>map.distance();</code>
            </fieldset>
            <p>测面积：</p>
            <fieldset>
                <legend><input type="button"></input></legend>
                <code>map.area();</code>
            </fieldset>
        </div>
	</body>
</html>
